-- GENERATED SPELL FOR [Twilight Drakonaar] --


function spell0_20910(pUnit, Event) --@Brood Power: Black,n/a--
pUnit:FullCastSpellOnTarget(22560,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20910', 580, 1)
end

function spell1_20910(pUnit, Event) --@Brood Power: Black,n/a--
pUnit:FullCastSpellOnTarget(39033,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20910', 571, 1)
end

function spell2_20910(pUnit, Event) --@Brood Power: Blue,n/a--
pUnit:FullCastSpellOnTarget(22559,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20910', 6347, 1)
end

function spell3_20910(pUnit, Event) --@Brood Power: Blue,n/a--
pUnit:FullCastSpellOnTarget(39037,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20910', 6271, 1)
end

function spell4_20910(pUnit, Event) --@Brood Power: Bronze,Self--
pUnit:FullCastSpellOnTarget(22642,pUnit)
pUnit:RegisterEvent('Sorts_20910', 6257, 1)
end

function spell5_20910(pUnit, Event) --@Brood Power: Bronze,Self--
pUnit:FullCastSpellOnTarget(39036,pUnit)
pUnit:RegisterEvent('Sorts_20910', 6334, 1)
end

function spell6_20910(pUnit, Event) --@Brood Power: Green,n/a--
pUnit:FullCastSpellOnTarget(22561,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20910', 1338, 1)
end

function spell7_20910(pUnit, Event) --@Brood Power: Red,n/a--
pUnit:FullCastSpellOnTarget(22558,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20910', 5000, 1)
end

function spell8_20910(pUnit, Event) --@Brood Power: Red,n/a--
pUnit:FullCastSpellOnTarget(39034,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20910', 5000, 1)
end

function Sorts_20910(pUnit, Event)
local choix_sorts_20910 = math.random(0, 8)
if choix_sorts_20910 == 0 then
pUnit:RegisterEvent('spell0_20910', 1, 1)
end
if choix_sorts_20910 == 1 then
pUnit:RegisterEvent('spell1_20910', 1, 1)
end
if choix_sorts_20910 == 2 then
pUnit:RegisterEvent('spell2_20910', 1, 1)
end
if choix_sorts_20910 == 3 then
pUnit:RegisterEvent('spell3_20910', 1, 1)
end
if choix_sorts_20910 == 4 then
pUnit:RegisterEvent('spell4_20910', 1, 1)
end
if choix_sorts_20910 == 5 then
pUnit:RegisterEvent('spell5_20910', 1, 1)
end
if choix_sorts_20910 == 6 then
pUnit:RegisterEvent('spell6_20910', 1, 1)
end
if choix_sorts_20910 == 7 then
pUnit:RegisterEvent('spell7_20910', 1, 1)
end
if choix_sorts_20910 == 8 then
pUnit:RegisterEvent('spell8_20910', 1, 1)
end
end

function mob20910_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_20910', math.random(1500, 3000), 1)
end

function mob20910_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20910_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20910_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(20910, 1, 'mob20910_Action')
RegisterUnitEvent(20910, 2, 'mob20910_Leave')
RegisterUnitEvent(20910, 3, 'mob20910_Kill')
RegisterUnitEvent(20910, 4, 'mob20910_Die')
